package com.wa.mp.mapper;

import com.wa.mp.beans.Employee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Mapper接口
 * 	
 * 基于Mybatis:  在Mapper接口中编写CRUD相关的方法  提供Mapper接口所对应的SQL映射文件 以及 方法对应的SQL语句. 
 * 
 * 基于MP:  让XxxMapper接口继承 BaseMapper接口即可.
 * 		   BaseMapper<T> : 泛型指定的就是当前Mapper接口所操作的实体类类型 
 * 
 */
@Component
public interface EmployeeMapper extends BaseMapper<Employee> {
    //   Integer  insertEmployee(Employee employee );
	//   <insert useGeneratedKeys="true" keyProperty="id" > SQL...</insert>
    List<Map<String,Object>> mapBuildingConsumption();

    void testParamBean(Employee employee);

    void testParamMap(Map<String,Object> employee);

    /**
     * 错误写法 for迭代map
     */
    void testMapParamList(@Param("cycleMap") Map<String,Object> employee);
    List<Map<Long,Integer>> testReturnMap();



}
